How to write this kind of java source in clojure. [closed]

Posted by tikky on Programmers See other posts from Programmers or by tikky
Published on 2011-01-05T08:48:32Z Indexed on 2011/01/06 4:59 UTC
Read the original article Hit count: 209

Filed under:
|

I want to know how to write a clojure code by looking at a java code like this.


import xxxxxx
import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;

public class Clojure4Vaadin extends AbstractApplicationServlet {

    @Override
    protected Class <? extends Application > getApplicationClass()
            throws ClassNotFoundException {
        return Application.class;
    }

    @Override
    protected Application getNewApplication(HttpServletRequest request) throws ServletException {
    try {
    RT.load(getServletConfig().getInitParameter("script-name"), true);

            //run Lisp function
    return (Application)RT.var(getServletConfig().getInitParameter("package-name"),getServletConfig().getInitParameter("function-name")).invoke(new String[0]);
    }
    catch (Exception e) {
    throw new ServletException(e);
    }
  }
}

I need to write a code clojure code which can do the sane thing that this java code can do.

© Programmers or respective owner

Related posts about java

Related posts about vaadin